// Author: combacsa@kaist.ac.kr
// http://www.jungol.co.kr/prog/Hanal/hanalView.php?qs_code=1004

//#define COMPILE
#ifdef COMPILE

#include <fstream>
#include <math.h>
using namespace std;

int n;
int data[100];
int sum = 0;
int stdev = 0;
double ans;
double average;

void input() {
	ifstream in("input.txt");
	in >> n; 
	for (int i = 0; i < n; i++) {
		in >> data[i];
		sum += data[i];
	}

	in.close();
}

void solve() {
	average = (double)sum / (double) n;
	double sum = 0;
	for (int i = 0; i < n; i++) {
		sum += (data[i] - average) * (data[i] - average);
	}
	ans = sqrt(sum / (double)n );

}

double round(double x) {
	return ((double)(int)(x * 10 + 0.5)) / 10.0;
}

void output() {
	ofstream out("output.txt");
	out << sum << endl << round(average) << endl << round(ans) << endl;
	out.close();
}

int main() {
	input();
	solve();
	output();

	return 0;
}
#endif
